Public Class Options

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()
    End Sub

    Private Sub Options_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Settings.Dictionary = 2 Then
            include1.Checked = False
        Else : include1.Checked = True
        End If
        min.Maximum = 28
        min.Value = My.Settings.MinLen
        max.Value = My.Settings.MaxLen

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        My.Settings.MaxLen = max.Value
        My.Settings.MinLen = min.Value
        If include1.Checked = False Then
            My.Settings.Dictionary = 2
        Else : My.Settings.Dictionary = 1
        End If
        Me.Close()
    End Sub

    Private Sub min_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles min.ValueChanged
        max.Minimum = min.Value + 1
    End Sub

    Private Sub max_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles max.ValueChanged
        min.Maximum = max.Value - 1
    End Sub

    Private Sub include1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles include1.CheckedChanged
        If include1.Checked = False Then
            max.Maximum = 21
        Else : max.Maximum = 28
        End If
    End Sub
End Class